<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<!-- import CSS -->
	<link rel="stylesheet" href="https://unpkg.com/element-ui@2.13.1/lib/theme-chalk/index.css">
	<!-- import Vue before Element -->
	<script src="https://unpkg.com/vue/dist/vue.js"></script>
	<!-- import JavaScript -->
	<script src="https://unpkg.com/element-ui/lib/index.js"></script>
	<body>
		<div id="app">
		<template>
		  <el-button :plain="true" @click="open1">消息</el-button>
		  <el-button :plain="true" @click="open2">成功</el-button>
		  <el-button :plain="true" @click="open3">警告</el-button>
		  <el-button :plain="true" @click="open4">错误</el-button>
		</template>
		</div>
		
	</body>
	<script>
		var Main = {
		    methods: {
		      open1() {
		        this.$message({
		          showClose: true,
		          message: '这是一条消息提示'
		        });
		      },
		
		      open2() {
		        this.$message({
		          showClose: true,
		          message: '恭喜你，这是一条成功消息',
		          type: 'success'
		        });
		      },
		
		      open3() {
		        this.$message({
		          showClose: true,
		          message: '警告哦，这是一条警告消息',
		          type: 'warning'
		        });
		      },
		
		      open4() {
		        this.$message({
		          showClose: true,
		          message: '错了哦，这是一条错误消息',
		          type: 'error'
		        });
		      }
		    }
		  }
		var Ctor = Vue.extend(Main)
		new Ctor().$mount('#app')
	</script>
</html>
